(function() {
    angular.module('app').factory('darenShopComponentService', darenShopComponentService);

    darenShopComponentService.$inject = ['util', '$q'];

    function darenShopComponentService(util, $q) {

        return {
            getDarenShop: _getDarenShop
        }

        function _getDarenShop(json) {

            var defer = $q.defer();

            util.$get({
                url: '/marketconditions/daren/getDarenShops.htm',
                data: json
            }).then(function(resp) {

                defer.resolve(resp.value);

            }, function(err) {

                defer.reject(err);

            });

            return defer.promise;

        }
    }
})();
